let v = new Vue({
    el:'#app',
    data:{
        deptList:{}
    },
    methods:{
        findDeptAll:function (){
            axios('dept/findDeptAll')
                .then(response=>{
                    if (response.data.flag){
                        this.deptList = response.data.data;
                    }
                }).catch(error=>{
                    layer.msg(error.message);
            })
        },
        toUserDetail:function (userId){
            sessionStorage.setItem("userId",userId);
        }
    },
    created:function (){
        this.findDeptAll();
    }
})